import { createRouter, createWebHistory } from 'vue-router';

// 导入需要的组件
import Manage from '../pages/manage/index.vue'
import Home from '../pages/Home.vue';
import About from '../pages/About.vue';
import Layout from "../components/Layout.vue"
import Login from "../pages/Login.vue"

// 定义路由
const routes = [
  { path: '/', component: Manage },
  { path: '/test', component: Layout, children: [
    {
        path: "/home",
        component: Home,
    },{
        path: "/about",
        component: About,
    }
  ] },
  { path: '/login', component: Login },
];

// 创建路由器实例
const router = createRouter({
  history: createWebHistory(), // 使用 HTML5 模式
  routes, // 路由配置
});

export default router;